package com.dzx.design.creational.prototype;

/**
 * @author dzx
 * @ClassName:
 * @Description:  原型模式
 * @date 2019年07月30日 10:33:17
 */
public class Mail implements  Cloneable{

    private String name;
    private String emailAddress;
    private String content;

    public Mail() {
        System.out.println("Mail class Constructor");
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        System.out.println("clone mail object");
        return super.clone();
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmailAddress() {
        return emailAddress;
    }

    public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
